﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;
using Kevin.Shop.Business.SalesManagement.Components;
using RiderShop.Mobile.Modle.MyAccount;
using RiderShop.Mobile.ServiceEntity.MyAccount;
using System.Web.Script.Serialization;
using RiderShop.Mobile.Common.Component;

namespace RiderShop.WebSite.Controllers.MyAccount
{
    public partial class MyAccountController : ThemeController
    {
        [Authorize]
        public JsonResult RegionList(int parentId)
        {
            List<RegionBasicInfo> regionList = new List<RegionBasicInfo>();
            regionList = MyAccountModel.GetRegionListByParentId(parentId);
            return Json(regionList,JsonRequestBehavior.AllowGet);
        }

        [Authorize]
        public ActionResult GetRegionById(int regionId)
        {
            var result = MyAccountModel.GetRegionByRegionId(regionId);
            return Content(result);
        }
    }
}
